Native Style
네이티브 스타일 수정
PATCH
/
api
/
manager
/
native-styles
/
{sid}
네이티브 스타일 수정
curl --request PATCH \
--url https://your_a2_service/api/manager/native-styles/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"css": "<string>",
"description": "<string>",
"editor_config": null,
"height": 1,
"html": "<string>",
"is_fluid": true,
"name": "<string>",
"width": 1
}
'import requests
url = "https://your_a2_service/api/manager/native-styles/{sid}"
payload = {
"css": "<string>",
"description": "<string>",
"editor_config": None,
"height": 1,
"html": "<string>",
"is_fluid": True,
"name": "<string>",
"width": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
css: '<string>',
description: '<string>',
editor_config: null,
height: 1,
html: '<string>',
is_fluid: true,
name: '<string>',
width: 1
})
};
fetch('https://your_a2_service/api/manager/native-styles/{sid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/manager/native-styles/{sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'css' => '<string>',
'description' => '<string>',
'editor_config' => null,
'height' => 1,
'html' => '<string>',
'is_fluid' => true,
'name' => '<string>',
'width' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/manager/native-styles/{sid}"
payload := strings.NewReader("{\n \"css\": \"<string>\",\n \"description\": \"<string>\",\n \"editor_config\": null,\n \"height\": 1,\n \"html\": \"<string>\",\n \"is_fluid\": true,\n \"name\": \"<string>\",\n \"width\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/api/manager/native-styles/{sid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"css\": \"<string>\",\n \"description\": \"<string>\",\n \"editor_config\": null,\n \"height\": 1,\n \"html\": \"<string>\",\n \"is_fluid\": true,\n \"name\": \"<string>\",\n \"width\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/native-styles/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"css\": \"<string>\",\n \"description\": \"<string>\",\n \"editor_config\": null,\n \"height\": 1,\n \"html\": \"<string>\",\n \"is_fluid\": true,\n \"name\": \"<string>\",\n \"width\": 1\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"css": "<string>",
"format_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"html": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"editor_config": "<unknown>",
"editor_type": "guided",
"height": 1,
"is_fluid": false,
"no": 123,
"status": "inactive",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"width": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}인증
Bearer 인증. 액세스 토큰을 Authorization: Bearer <token> 헤더로 전달합니다.
경로 매개변수
본문
application/json
응답
성공 응답
이 스타일의 CSS 스타일시트.
이 스타일이 속하는 NativeFormat ID.
HTML 템플릿 문자열. 변수 플레이스홀더는 NativeFormatVariable.name과 일치합니다.
고유 식별자(UUID v4).
스타일의 표시 이름.
스타일을 소유한 오퍼레이터 ID.
스타일 설명(선택 사항).
프론트엔드 가이드형 에디터 상태입니다. 백엔드는 해석하지 않으며, 서빙은 html/css를 사용합니다.
에디터 유형: GUIDED(폼 기반) 또는 CODE(HTML/CSS 직접 작성).
사용 가능한 옵션:
guided, code 광고 단위의 고정 높이(픽셀).
필수 범위:
x >= 0컨테이너 너비에 맞게 스타일을 늘릴지 여부.
스타일의 운영 상태.
사용 가능한 옵션:
active, inactive 이 스타일에 적용된 NativeStyleTemplate ID.
광고 단위의 고정 너비(픽셀). is_fluid가 true이면 무시됩니다.
필수 범위:
x >= 0이 페이지가 도움이 되었나요?
⌘I
네이티브 스타일 수정
curl --request PATCH \
--url https://your_a2_service/api/manager/native-styles/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"css": "<string>",
"description": "<string>",
"editor_config": null,
"height": 1,
"html": "<string>",
"is_fluid": true,
"name": "<string>",
"width": 1
}
'import requests
url = "https://your_a2_service/api/manager/native-styles/{sid}"
payload = {
"css": "<string>",
"description": "<string>",
"editor_config": None,
"height": 1,
"html": "<string>",
"is_fluid": True,
"name": "<string>",
"width": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
css: '<string>',
description: '<string>',
editor_config: null,
height: 1,
html: '<string>',
is_fluid: true,
name: '<string>',
width: 1
})
};
fetch('https://your_a2_service/api/manager/native-styles/{sid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/manager/native-styles/{sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'css' => '<string>',
'description' => '<string>',
'editor_config' => null,
'height' => 1,
'html' => '<string>',
'is_fluid' => true,
'name' => '<string>',
'width' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/manager/native-styles/{sid}"
payload := strings.NewReader("{\n \"css\": \"<string>\",\n \"description\": \"<string>\",\n \"editor_config\": null,\n \"height\": 1,\n \"html\": \"<string>\",\n \"is_fluid\": true,\n \"name\": \"<string>\",\n \"width\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/api/manager/native-styles/{sid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"css\": \"<string>\",\n \"description\": \"<string>\",\n \"editor_config\": null,\n \"height\": 1,\n \"html\": \"<string>\",\n \"is_fluid\": true,\n \"name\": \"<string>\",\n \"width\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/native-styles/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"css\": \"<string>\",\n \"description\": \"<string>\",\n \"editor_config\": null,\n \"height\": 1,\n \"html\": \"<string>\",\n \"is_fluid\": true,\n \"name\": \"<string>\",\n \"width\": 1\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"css": "<string>",
"format_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"html": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"editor_config": "<unknown>",
"editor_type": "guided",
"height": 1,
"is_fluid": false,
"no": 123,
"status": "inactive",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"width": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}